<template>
    <div class="content">
        <el-breadcrumb separator="/">
            <el-breadcrumb-item v-for="item in navData" :key="item.meta.title" :to="{ path: item.path }">{{ item.meta.title
            }}</el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    computed: {
        navData() {

            let that = this, matches = that.$route.matched, catalog = that.$route.query.Catalog || "name", index = 0,
                maps = { Home: "首页", mbPosition: "会员持仓", mbBalance: "会员余额", mbPositionRecord: "会员持仓记录", mbBalanceRecord: "会员余额记录", epTicketRecord: "企业持票记录", finance: "财务", epPremium: "企业号段手续费记录", team: "团队", configure: "配置", document: "文档" };

            // console.log(['computed------',matches,catalog]);
            console.log(matches);
            matches[0].path = '/';
            index = matches.length - 1;
            matches[index].meta.title = maps[catalog] || "首页";
            // matches[index].meta.title = maps[catalog] || "节点集";
            matches[index].query = that.$route.query;

            // this.$router.push(matches[1].path)

            return matches
        }
    }
}
</script>

<style></style>